#include <stdio.h>
#include "candle.h"
#define MAX_PATH 255

//当前只是测试一下HCC文件的读取和解析
//以后还会用到这个部分
int main()
{
    //the api of read tick
    struct candle *obj =  candle_new();
	//setting
    candle_set_string(obj,  CANDLE_PATH_SRC,  "E:\\MT5\\Bases\\MetaQuotes-Demo\\history");
    candle_set_string(obj,  CANDLE_PATH_DATA, "E:\\MT5\\MQL5\\Files\\Candle");
    candle_set_integer(obj, CANDLE_TIMEZONE, 0);
	candle_set_integer(obj, CANDLE_TIMEZONE_APP, 8);

	//dump
	//candle_dump(obj, CANDLE_SYMBOL_EURUSD, CANDLE_PERIOD_M1, CANDLE_DUMP_BIN);
	//candle_dump(obj, CANDLE_SYMBOL_EURUSD, CANDLE_PERIOD_M1, CANDLE_DUMP_CSV);
	candle_dump(obj, CANDLE_SYMBOL_EURUSD, CANDLE_PERIOD_H4, CANDLE_DUMP_CSV);
	candle_dump(obj, CANDLE_SYMBOL_EURUSD, CANDLE_PERIOD_D1, CANDLE_DUMP_CSV);
	//candle_dump(obj, CANDLE_SYMBOL_EURUSD, CANDLE_PERIOD_W1, CANDLE_DUMP_CSV);
    return 0;
}
